<?php
/*
 * Creado en May 21, 2007
 *
 * creado por: cast
 * proyecto: sitweb
 */
 
function smarty_function_link_to($params, &$smarty){
    if (empty($params['label']) or empty($params['route'])) {
        $smarty->trigger_error("assign: missing 'var' parameter");
        return;
    }
    $class = $params['class'];
    $label = $params['label'];
    $route = $params['route'].$params['value'];
    $link = VHOST_PREFIX.APP_NAME_PREFIX."{$route}";
    if(isset($class))
    	$a_href = "<a class=\"{$class}\" href=\"{$link}\">{$label}</a>";
    else
    	$a_href = "<a href=\"{$link}\">{$label}</a>";
    return $a_href; 	
}
?>
